Transparent background fill for StageStyle.EXTENDED windows#2045
Transparent background fill for StageStyle.EXTENDED windows#2045crschnick wants to merge 1 commit into
Conversation
|
👋 Welcome back crschnick! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
How is this supposed to work? If I set the scene background to |
|
Last time I tested the EXTENDED style, you always got a white background layer even if the scene background and other stuff was transparent. Maybe transparent background is the wrong naming, the point of this PR is to get the raw window frame background and not a white one. The window frame can be light, dark, or anything else if you customize it via native calls. E.g. if you call DwmSetWindowAttribute with DWMWA_SYSTEMBACKDROP_TYPE via a native call, you can also use something like the Mica theme for the window. Then, with this PR, you get the actual Mica background for the whole window. That is/was the appeal of the UNIFIED stage style, which would also be nice to have for the EXTENDED style |
|
I think this enhancement would be more compelling if it actually gave you the translucent/acrylic background material. |
|
I am just about to submit a PR for JDK-8375578 which enables translucent system backdrops on macOS and Windows 11. I will get that PR submitted in a day or two. |
|
@mstr2 In general, do you see any potential problems with this change? Or would this be ok to be added like this |
Changing an internal implementation detail for one particular OS so that you can later do something that we explicitly don't support is an answer for the wrong question. There's no API in JavaFX to interact directly with the native window implementation, and that's for a good reason. If people start depending on a particular implementation detail, the system will become progressively harder to maintain. Let's do it the other way around, and start by asking what the goal should be. I understand that you want to have translucent window backdrops; people have been asking for this feature for ages, and we've discussed it several times. But we need an API and a specification for that, and then support it indefinitely on at least Windows and macOS. If I really needed to make something work for an application and I needed it now, I'd probably build a custom version of JavaFX with the understanding that I'm doing this at my own risk. |
|
Looking at the code in |
|
I think we need to have an additional piece of information in Let Let's suppose I specify |
|
@crschnick This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply issue a |
|
Hi @Calboot, thanks for making a comment in an OpenJDK project! All comments and discussions in the OpenJDK Community must be made available under the OpenJDK Terms of Use. If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please Use "Add GitHub user Calboot" for the summary. If you are not an OpenJDK Author, Committer or Reviewer, simply check the box below to accept the OpenJDK Terms of Use for your comments.
Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use. |
|
@Calboot To use the |


This is a small experiment for the request for a transparent background fill for extended windows. In reference to a discussion on the mailing list a few months ago: https://mail.openjdk.org/pipermail/openjfx-dev/2025-October/056849.html
This treats EXTENDED windows just as UNIFIED windows on Windows. There is still the lingering issue with UNIFIED something resulting in a blank window (https://bugs.openjdk.org/browse/JDK-8154847), but there is a workaround with
Dprism.forceUploadingPainter=trueProgress
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/2045/head:pull/2045$ git checkout pull/2045Update a local copy of the PR:
$ git checkout pull/2045$ git pull https://git.openjdk.org/jfx.git pull/2045/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2045View PR using the GUI difftool:
$ git pr show -t 2045Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/2045.diff